package top.vanchor.myblog2back.service;

import com.github.pagehelper.PageInfo;
import top.vanchor.myblog2back.entity.BlogBlog;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Ding
 * @since 2021-11-12
 */
public interface IBlogBlogService extends IService<BlogBlog> {

    List<Map<String, Object>> getBlogById(Integer blog_id,Integer uId);

    int toDelBlogById(int blog_id);

    int hiddenBlogById(int blog_id,int type);

    int noHiddenBlogById(int blog_id);

    int toCreateBlog(BlogBlog blogBlog);

    int toUpdateBlog(BlogBlog blogBlog);

    PageInfo<Map<String, Object>> getSearchBlogJson(Integer index, Integer num, String searchText,Integer uId,Integer type,List<Integer> starIds);

    int addViewTime(int blogId);

    int toLikeOrUnlikeBlog(Integer blogId, Integer type, Integer uId);

    int editBlogNav(BlogBlog data);
}
